<template>
	<view>
		<scroll-view :scrollX="param.list_style!=4?'false':'true'">
        <view class="flex-row diy-goods-list-0 flex-grow-0" :style="param.list_style!=4?'flex-wrap:wrap':'overflow:auto'">
            <view :class="['flex-grow-0 diy-goods-one', 'diy-goods-one-'+param.list_style, 'flex-row diy-goods-border', 'diy-goods-border-'+param.style]" v-for="(value,key) in param.list[param.cat_index].goods_list" :key="value.id">
                <view :class="['flex-grow-0', 'diy-goods-img-'+param.list_style]" style="position:relative;" :style="param.list_style==0&&param.per==1?'height: 466upx;':''">
                    <form @submit="$emit('_formIdSubmit',$event)" data-type="navigate" :data-url="value.page_url" reportSubmit="true">
                        <button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
                            <image :class="'diy-goods-img-'+param.list_style" lazyLoad="true" :mode="param.fill==1?'aspectFill':'aspectFit'" :src="value.pic_url" :style="param.list_style==0&&param.per==1?'height: 466upx;':''"></image>
                        </button>
                    </form>
                    <image class="diy-goods-mark" lazyLoad="true" :src="param.mark_url" v-if="param.mark==1"></image>
                    <view :class="['miaosha-time flex-row flex-y-center flex-x-center', 'miaosha-time-'+param.list_style]" v-if="param.list_style!=1&&(type=='miaosha'||type=='bargain'||type=='lottery')&&param.time==1">
                        <view class="fs-b flex-grow-1" style="text-align:left" v-if="param.list_style==0">{{param.type_name}}</view>
                        <view class="fs-sm">{{time_all[type+'_'+template_index].param.list[param.cat_index].goods_list[key].time_content}}{{time_all[type+'_'+template_index].param.list[param.cat_index].goods_list[key].time_list.content_ms}}</view>
                    </view>
                </view>
                <view :class="['flex-row flex-grow-0 diy-goods-content', 'diy-goods-content-'+param.list_style]">
                    <block v-if="param.list_style==1&&(type=='miaosha'||type=='bargain'||type=='lottery')&&param.time==1">
                        <navigator class="w-100" hoverClass="none" style="text-align:left" :url="value.page_url">
                            <view :class="['pt-24 text-more', param.style>=2&&param.list_style!=1?'text-center':'']" style="width:100%;height:auto;" v-if="param.name==1">{{value.name}}</view>
                        </navigator>
                        <view :class="['flex-row flex-y-center w-100', 'miaosha-time-'+param.list_style]">
                            <view class="fs-b flex-grow-0" style="text-align:left">
                                <image :src="__wxapp_img.lottery.time.url" style="width:24upx;height:24upx;margin-right:12upx;"></image>
                            </view>
                            <view class="fs-sm flex-grow-0">{{time_all[type+'_'+template_index].param.list[param.cat_index].goods_list[key].time_content}}
                                    <text class="red">{{time_all[type+'_'+template_index].param.list[param.cat_index].goods_list[key].time_list.content_ms}}</text>
                            </view>
                        </view>
                    </block>
                    <navigator class="w-100" hoverClass="none" style="text-align:left" :url="value.page_url" v-else>
                        <view :class="['pt-24', param.list_style==0?'text-more':'text-more-2', param.style>=2&&param.list_style!=1?'text-center':'']" :style="{width:param.price==0&&param.buy==1&&param.list_style==0?'calc(100% - 50upx)':'100%',height:param.list_style==0?'auto':'3.6em'}" v-if="param.name==1">{{value.name}}</view>
                    </navigator>
                    <navigator class="flex-grow-1" hoverClass="none" :url="value.page_url" v-if="param.price==1">
                        <view :class="['pt-24 diy-goods-price flex-grow-1 flex-y-bottom', param.style>=2?'flex-x-center':'']" v-if="type=='goods'||type=='book'">{{value.price_content}}</view>
                        <block v-else-if="type=='lottery'">
                            <view :class="['pt-24 diy-goods-price flex-grow-1 flex-y-bottom flex-row fs-sm', param.style>=2?'flex-x-center':'']" v-if="param.list_style==0">
                                <view class="fs-b">免费</view>
                                <view class="font-default fs-sm" style="text-decoration: line-through" v-if="param.style<2">￥{{value.original_price}}</view>
                            </view>
                            <block v-if="param.list_style==1">
                                <view class="diy-goods-price flex-grow-1 flex-y-bottom flex-row fs-sm" style="width:100%;">
                                    <view class="fs-b">免费</view>
                                </view>
                                <view class="font-default fs-sm flex-y-bottom flex-grow-1">{{value.original_price_content}}￥{{value.original_price}}</view>
                            </block>
                            <block v-if="param.list_style==2">
                                <view :class="['diy-goods-price flex-y-bottom flex-row fs-sm', param.style>=2?'flex-x-center':'']" style="width:100%;">
                                    <view class="fs-b">免费</view>
                                </view>
                                <view :class="['font-default fs-sm flex-y-bottom', param.style>=2?'flex-x-center':'']" style="width:100%;">{{value.original_price_content}}￥{{value.original_price}}</view>
                            </block>
                        </block>
                        <block v-else-if="type=='integral'">
                            <view :class="['pt-24 diy-goods-price flex-grow-1 flex-y-bottom flex-row', param.style>=2?'flex-x-center':'']" v-if="param.list_style==0">
                                <view style="font-size:11pt;">{{value.integral_content}}</view>
                            </view>
                            <block v-if="param.list_style==1">
                                <view class="diy-goods-price flex-grow-1 flex-y-bottom flex-row" style="width:100%;">
                                    <view style="font-size:11pt;">{{value.integral_content}}</view>
                                </view>
                                <view class="font-default fs-sm flex-y-bottom flex-grow-1">{{value.original_price_content}}</view>
                            </block>
                            <block v-if="param.list_style==2">
                                <view class="diy-goods-price flex-y-bottom flex-row" style="width:100%;">
                                    <view class="" style="font-size:11pt;">{{value.integral_content}}</view>
                                </view>
                                <view class="font-default fs-sm flex-y-bottom" style="width:100%;">{{value.original_price_content}}</view>
                            </block>
                        </block>
                        <block v-else>
                            <view :class="['pt-24 diy-goods-price flex-grow-1 flex-y-bottom flex-row fs-sm', param.style>=2?'flex-x-center':'']" v-if="param.list_style==0">
                                <view>{{value.price_content}}￥
                                                <text class="fs-b">{{value.price}}</text>
                                </view>
                                <view class="font-default fs-sm" style="text-decoration: line-through" v-if="param.style<2">￥{{value.original_price}}</view>
                            </view>
                            <block v-if="param.list_style==1">
                                <view class="diy-goods-price flex-grow-1 flex-y-bottom flex-row fs-sm" style="width:100%;">{{value.price_content}}￥
                                            <text class="fs-b">{{value.price}}</text>
                                </view>
                                <view class="font-default fs-sm flex-y-bottom flex-grow-1">{{value.original_price_content}}￥{{value.original_price}}</view>
                            </block>
                            <block v-if="param.list_style==2">
                                <view :class="['diy-goods-price flex-y-bottom flex-row fs-sm', param.style>=2?'flex-x-center':'']" style="width:100%;">{{value.price_content}}￥
                                            <text class="fs-b">{{value.price}}</text>
                                </view>
                                <view :class="['font-default fs-sm flex-y-bottom', param.style>=2?'flex-x-center':'']" style="width:100%;">{{value.original_price_content}}￥{{value.original_price}}</view>
                            </block>
                        </block>
                    </navigator>
                    <form @submit="$emit('_formIdSubmit',$event)" class="flex-y-bottom" data-bind="modalShowGoods" :data-cat="param.cat_index" :data-goods="key" :data-template="template_index" reportSubmit="true" v-if="(param.list_style!=2||type=='goods'||type=='book')&&value.is_negotiable==0&&param.buy==1&&param.list_style<3&&(param.style<2||param.list_style==1)">
                        <button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
                            <view class="flex-grow-0 flex" style="justify-content: flex-end" :style="{width:param.price==0&&(param.list_style==1||param.list_style==2)?'100%':'auto'}">
                                <view :class="['text-more buy-btn-cat', 'buy-btn-'+param.buy_list]" v-if="param.buy_list>=2">{{param.buy_content?param.buy_content:'购买'}}</view>
                                <image lazyLoad="true" mode="aspectFill" :src="param.buy_content" style="width:50upx;height:50upx;" v-else></image>
                            </view>
                        </button>
                    </form>
                </view>
            </view>
        </view>
    </scroll-view>
	</view>
</template>

<script>var myVue = {};
	export default {
		props:['param','template_index','WindowHeight','type','time_all'],
		data() {
			return {
				
			};
		}
	}
</script>

<style scoped>

</style>
